// import { observable, action } from "mobx";
import { observable } from "mobx";
import { ReactChild, ReactFragment, ReactPortal, createContext, useContext } from "react"
import { useLocalObservable, enableStaticRendering } from 'mobx-react-lite';
import active from './active/index'
import LoingInfo from './loginInfo'
const store={
  active:new active(),
  loingInfo:new LoingInfo()
}
type Istore =typeof store

const context = createContext(store)
export  const useStores = () => useContext(context);

export interface IStore<T>{
  data:T; 
}
  

export const StoreProvider = (props: { children: boolean | ReactChild | ReactFragment | ReactPortal | null | undefined; }) => {
 
  return (
      <context.Provider value={store}>{props.children}</context.Provider>
  );
};
